package com.triz.business.service.impl;

import java.util.List;
import com.triz.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.triz.business.mapper.ProjectSystemMapper;
import com.triz.business.domain.ProjectSystem;
import com.triz.business.service.IProjectSystemService;

/**
 * 项目系统Service业务层处理
 * 
 * @author hlk
 * @date 2025-11-15
 */
@Service
public class ProjectSystemServiceImpl implements IProjectSystemService 
{
    @Autowired
    private ProjectSystemMapper projectSystemMapper;

    /**
     * 查询项目系统
     * 
     * @param id 项目系统主键
     * @return 项目系统
     */
    @Override
    public ProjectSystem selectProjectSystemById(Long id)
    {
        return projectSystemMapper.selectProjectSystemById(id);
    }

    /**
     * 查询项目系统列表
     * 
     * @param projectSystem 项目系统
     * @return 项目系统
     */
    @Override
    public List<ProjectSystem> selectProjectSystemList(ProjectSystem projectSystem)
    {
        return projectSystemMapper.selectProjectSystemList(projectSystem);
    }

    /**
     * 新增项目系统
     * 
     * @param projectSystem 项目系统
     * @return 结果
     */
    @Override
    public int insertProjectSystem(ProjectSystem projectSystem)
    {
        projectSystem.setCreateTime(DateUtils.getNowDate());
        return projectSystemMapper.insertProjectSystem(projectSystem);
    }

    /**
     * 修改项目系统
     * 
     * @param projectSystem 项目系统
     * @return 结果
     */
    @Override
    public int updateProjectSystem(ProjectSystem projectSystem)
    {
        projectSystem.setUpdateTime(DateUtils.getNowDate());
        return projectSystemMapper.updateProjectSystem(projectSystem);
    }

    /**
     * 批量删除项目系统
     * 
     * @param ids 需要删除的项目系统主键
     * @return 结果
     */
    @Override
    public int deleteProjectSystemByIds(Long[] ids)
    {
        return projectSystemMapper.deleteProjectSystemByIds(ids);
    }

    /**
     * 删除项目系统信息
     * 
     * @param id 项目系统主键
     * @return 结果
     */
    @Override
    public int deleteProjectSystemById(Long id)
    {
        return projectSystemMapper.deleteProjectSystemById(id);
    }
}
